import http.client
#访问agileone首页，端口80是默认值，可不指定
conn = http.client.HTTPConnection(host="localhost",port=80)
conn.request("GET","/agileone/")
content = conn.getresponse().read().decode()
print(content)
#实现Agileone
#构建请求正文：字符串
param = "username=admin&password=admin&savelogin=ture"
#构建请求头：字典
header = {"Content-type":"application/x-www-form-urlencoded"}
#建立与服务器的连接，与GET请求一致
conn = http.client.HTTPConnection("localhost")
#发送POST请求，指定URL地址，正文和请求头信息
conn.request("POST","/agileone/index.php/commom/login/",param,header)88
#读取响应内容
content = conn.getresponse().read()
print(content)